<template>
  <div>
    <!-- 销售详情表格 -->
    <vxe-table
      border
      stripe
      ref="detailTable"
      size="small"
      header-align="center"
      :data="detailTableData"
      scroll-x="auto"
    >
      <vxe-column type="seq" title="序号" width="60" fixed="left"></vxe-column>
      <vxe-column field="shipmentCode" title="发货单号" width="140" fixed="left" align="center"></vxe-column>
      <vxe-column field="orderCode" title="订单编号" width="140" fixed="left" align="center"></vxe-column>
      <vxe-column field="platformOrderCode" title="平台单号" width="140" align="center"></vxe-column>
      <vxe-column field="orderType" title="订单类型" width="100" align="center"></vxe-column>
      <vxe-column field="platformName" title="订单来源" width="100" align="center"></vxe-column>
      <vxe-column field="shopName" title="店铺名称" width="120" align="center"></vxe-column>
      <vxe-column field="clientName" title="会员名称" width="120" align="center"></vxe-column>
      <vxe-column field="bizUser" title="业务员" width="100" align="center"></vxe-column>
      <vxe-column field="orderCount" title="商品数量" width="100" align="center"></vxe-column>
      <vxe-column field="weight" title="标准重量" width="100" align="center"></vxe-column>
      <vxe-column field="volume" title="标准体积" width="100" align="center"></vxe-column>
      <vxe-column field="totalPrice" title="订单金额" width="120" align="center"></vxe-column>
      <vxe-column field="yieldAmount" title="让利金额" width="120" align="center"></vxe-column>
      <vxe-column field="expressFee" title="物流费用" width="100" align="center"></vxe-column>
      <vxe-column field="payAmount" title="支付金额" width="120" align="center"></vxe-column>
      <vxe-column field="refund" title="退款金额" width="120" align="center"></vxe-column>
      <vxe-column field="buyerRemark	" show-overflow="title" align="center" title="买家留言"></vxe-column>
      <vxe-column field="sellerRemark" show-overflow="title" align="center" title="卖家留言"></vxe-column>
      <vxe-column field="secRemark" show-overflow="title" align="center" title="二次备注"></vxe-column>
      <vxe-column field="extInfo" show-overflow="title" align="center" title="附加信息"></vxe-column>
    </vxe-table>
  </div>
</template>

<script>
import { listFinancialAuditOrders } from '@/api/mes/sales/financialAudit';
export default {
  name: "SaleDetails",
  props: {
    deliveryOrderId: {
      type: [Number, String],
      default: null
    }
  },
  data() {
    return {
      detailTableData: [],
      
    giftDialog: {
      visible: false,
      giftList: [],
      selected: []
    },
    };
  },
  watch: {
    deliveryOrderId: {
      handler(newVal) {
        if (newVal && newVal !== null) {
          this.getDetailList();
        } else {
          this.detailTableData = [];
        }
      },
      immediate: true
    }
  },
  methods: {
    getDetailList() {
      listFinancialAuditOrders(this.deliveryOrderId).then(response => {
        if (response.code === 200 && response.data) {
          this.detailTableData = response.data.volist;
        }
      });
    },
  }
};
</script>

<style scoped>
.mb8 {
  margin-bottom: 8px;
}
</style>
